/***********************
 * This is my attempt at a physics engine using Newtonian mechanics
 * Every single action, whether prompted by player or environment,
 * causes a "push." In addition, I plan to implement a constant force
 * of gravity as well as variable friction depending on the surface.
 ***********************/
import java.util.*;

public class PhysicsEngine extends Hashtable<Actor, ArrayList<Force>> implements Runnable 
{
    private PlayerCharacter pc;
    private GameEngine ge;
    
    public PhysicsEngine(GameEngine ge) {
        this.ge = ge;
        pc = new PlayerCharacter(ge);
        put(pc, new ArrayList<Force>());
    }
    public Actor getPlayer() {
        return (Actor) pc;
    }

    
    public void run() 
    {
            while (true) 
            {
                
                for (Force each: get(pc)) {
                    
                }
                    try {
                            Thread.sleep(50);
                    } catch (InterruptedException e) { return; }
            }
            
    }

}
